#pragma once
#include <sstream>

/* Error Throwing */
#define THROW_ERROR_0(command, err)					\
	{												\
		AdderString _dbv;						\
		_dbv << command;							\
		AdderString _tr;						\
		_tr << err;									\
		engine->_throwError(_dbv.c_str(),		\
							_tr.c_str());		\
	}

#define THROW_ERROR_1(command, p1, err)				\
	{												\
		AdderString _dbv;						\
		_dbv << command << " " << p1;				\
		AdderString _tr;						\
		_tr << err;									\
		engine->_throwError(_dbv.c_str(),		\
							_tr.c_str());		\
	}

#define THROW_ERROR_2(command, p1, p2, err)			\
	{												\
		AdderString _dbv;						\
		_dbv << command << " " << p1				\
						<< " " << p2;				\
		AdderString _tr;						\
		_tr << err;									\
		engine->_throwError(_dbv.c_str(),		\
							_tr.c_str());		\
	}

#define THROW_ERROR_3(command, p1, p2, p3, err)		\
	{												\
		AdderString _dbv;						\
		_dbv << command << " " << p1				\
						<< " " << p2				\
						<< " " << p3;				\
		AdderString _tr;						\
		_tr << err;									\
		engine->_throwError(_dbv.c_str(),		\
							_tr.c_str());		\
	}

#define THROW_ERROR_4(command, p1, p2, p3, p4, err)	\
	{												\
		AdderString _dbv;						\
		_dbv << command << " " << p1				\
						<< " " << p2				\
						<< " " << p3				\
						<< " " << p4;				\
		AdderString _tr;						\
		_tr << err;									\
		engine->_throwError(_dbv.c_str(),		\
							_tr.c_str());		\
	}